/**
 * @param {number[]} rolls
 * @param {number} mean
 * @param {number} n
 * @return {number[]}
 */
 var missingRolls = function(rolls, mean, n) {
    let num = (rolls.length+n)*mean
    let rollsAddNum = 0
    rolls.forEach(item=>rollsAddNum+=item)
    let m = num - rollsAddNum - n
    if(m/5 > n || rollsAddNum+n > num) return []
    return new Array(n).fill(1).map((_,i)=>i<=Math.floor(m/5)-1?6:i == Math.floor(m/5)? m%5+1:1)
};